package com.xxmw.transaction.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxmw.transaction.common.excep.service.TransactionException;
import com.xxmw.transaction.model.app.User;

public interface UserService extends IService<User> {

	/**
	 * 保存用户
	 * @param username
	 * @param password
	 * @param ip
	 * @return
	 */
	default User saveUser(String username, String password, String ip) throws TransactionException {return null;}

	/**
	 * 登陆
	 * @param username
	 * @param password
	 * @param ip
	 * @return
	 */
	default User login(String username, String password, String ip) throws TransactionException {return null;}

	/**
	 * 获取用户信息
	 * @param username
	 * @return
	 */
	default User getUser(String username) {return null;}

	/**
	 * 修改密码
	 * @param username
	 * @param pass
	 */
	void modifyPass (String username, String pass);

	void addVipTime (String username, Integer addTime);

	/**
	 * 是否是vip
	 * @param username
	 * @return
	 */
	boolean isVip (String username);

	/**
	 * 获取体验vip
	 * @param username
	 */
	void testVip (String username);
}
